<?php
/**
 * @file Model.php
 *
 * Contains a class for ORM representation of tables.
 *
 * http://code.google.com/p/rpd/wiki/Model.php
 *
 * New BSD License
 * \n
 * Copyright (c) 2010 Rpd-Team
 *
 * @namespace  rpd
 * @since      0.0.1
 * @version    0.0.1
 */

/**
 * ORM representation of tables.
 *
 * The models are ment to represent tables / sql statements as readable
 * array. Changes to this array will be executed in the database but not in
 * the model itself. Therefor you need to refresh sometimes.
 *
 * @author RMP
 *
 */
class Model {
	protected $table = NULL;
	protected $field = "*";
	protected $where = "1";
	protected $registry = "db/std";

	private $_db = NULL;

	function __construct($where = "1")
	{
		if ($table === NULL)
		{
			$table = str_replace("Model_", "", get_called_class());
		}

		$this->_db = new Db(Registry::get($this->config));
	}
}

?>